// src/main/java/cn/edu/tju/elm/model/dto/RechargeRequestDTO.java
package cn.edu.tju.elm.model.dto;

import java.math.BigDecimal;

public class RechargeRequestDTO {
    private Long userId;
    private BigDecimal amount;
    // 移除了paymentMethod字段

    // 构造方法
    public RechargeRequestDTO() {}

    // 验证方法
    public void validate() {
        if (userId == null) {
            throw new IllegalArgumentException("用户ID不能为空");
        }
        if (amount == null || amount.compareTo(BigDecimal.ZERO) <= 0) {
            throw new IllegalArgumentException("充值金额必须大于0");
        }
        // 移除了对paymentMethod的验证
    }

    // Getter和Setter
    public Long getUserId() { return userId; }
    public void setUserId(Long userId) { this.userId = userId; }

    public BigDecimal getAmount() { return amount; }
    public void setAmount(BigDecimal amount) { this.amount = amount; }
}